package edu.utd.text.game.controller.commands;

import java.util.ArrayList;

import edu.utd.text.game.controller.Controller;

public class ShowInventoryCommand implements GameCommand {

	
	public String execute() {
		Controller controller = Controller.INSTANCE;
		ArrayList<String> itemsInInventory = controller.getPlayer().getInventory().listInventory();
		
		if (itemsInInventory.isEmpty()) {
			return "You are not carrying any items.";
		}
		
		String list = "You are carrying the following items:";
		for (String itemName : itemsInInventory) {
			list += "\n" + itemName;
		}
		return list;
	}
	
	
}
